﻿namespace SpaceInvaders
{
    using System;
    using System.Speech.Synthesis;

    class Saucer
    {
        public static int x;
        public static int y;
        public string shape;
        public static int score = 50;
        public static int scoreMultiplier = 1;

        public Saucer()
        {
            shape = "(00000)";
            x = 7;
            y = 2;

            // Initialize a new instance of the SpeechSynthesizer.
            SpeechSynthesizer synth = new SpeechSynthesizer();


            // Configure the audio output. 
            synth.SetOutputToDefaultAudioDevice();

            // Speak a string.
            synth.Speak("Mystery Ship Detected!");
            synth.Dispose();
        }

        public void DrawSaucer()
        {
            Console.SetCursorPosition(x, y);
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write(shape);
            Console.ResetColor();
        }
        public void KillSaucer()
        {
            Console.SetCursorPosition(x - 1, y);
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write("xXXxXXx");
            Console.Beep(430, 600);
            Console.ResetColor();

        }
        public void ClearSaucer()
        {
            Console.SetCursorPosition(x - (shape.Length + 1), y);
            Console.Write(new string(' ', shape.Length));
        }
        public void RemoveSaucer()
        {
            Console.SetCursorPosition(x - 1, y);
            Console.Write(new string(' ', shape.Length + 1));
        }

        public void SetX(int n)
        {
            x = n;
        }
        public int GetX()
        {
            return x;
        }
        public int GetScore()
        {
            return score;
        }
        public int GetY()
        {
            return y;
        }
    }
}
